﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Hp.Vertica.Migration.SqlServer
{
    class SqlDataType_DateTime2 : SqlDataTypeWithPrecision
    {
        public SqlDataType_DateTime2() { }

        public SqlDataType_DateTime2(Int32 precision) : base(precision) { }

        public override string Name
        {
            get { return "DATETIME2"; }
        }

        public override int MinPrecision
        {
            get { return 0; }
        }

        public override int MaxPrecision
        {
            get { return 7; }
        }

        public override int DefaultPrecision
        {
            get { return 7; }
        }


        public override Client.Internal.VerticaDataType VerticaDataType
        {
            get { return new Client.Internal.VerticaDataType_Timestamp(this.Precision); }
        }

        public override System.Data.SqlDbType SystemDataType
        {
            get { return System.Data.SqlDbType.DateTime2; }
        }
    }
}
